package by.kniazhych.core.view.game.peace {
	import by.kniazhych.core.constants.PeaceType;
	import design.peaces.BlackGarmata;
	import design.peaces.BlackGetman;
	import design.peaces.BlackKniaz;
	import design.peaces.BlackKniazhych;
	import design.peaces.BlackLadzia;
	import design.peaces.BlackPawn;
	import design.peaces.BlackVaukalak;
	import design.peaces.WhiteGarmata;
	import design.peaces.WhiteGetman;
	import design.peaces.WhiteKniaz;
	import design.peaces.WhiteKniazhych;
	import design.peaces.WhiteLadzia;
	import design.peaces.WhitePawn;
	import design.peaces.WhiteVaukalak;
	import flash.display.DisplayObject;
	import flash.utils.Dictionary;
	
	/**
	 * ...
	 * @author Boutylin Mikhail
	 */
	
	
	
	public class PeaceViewFactory{
		
		private static const _classes:Dictionary = new Dictionary();
		
		_classes[PeaceType.WHITE_PAWN] = WhitePawn;
		_classes[PeaceType.WHITE_GARMATA] = WhiteGarmata;
		_classes[PeaceType.WHITE_VAUKALAK] = WhiteVaukalak;
		_classes[PeaceType.WHITE_LADZIA] = WhiteLadzia;
		_classes[PeaceType.WHITE_GETMAN] = WhiteGetman;
		_classes[PeaceType.WHITE_KNIAZHYCH] = WhiteKniazhych;
		_classes[PeaceType.WHITE_KNIAZ] = WhiteKniaz;
		
		_classes[PeaceType.BLACK_PAWN] = BlackPawn;
		_classes[PeaceType.BLACK_GARMATA] = BlackGarmata;
		_classes[PeaceType.BLACK_VAUKALAK] = BlackVaukalak;
		_classes[PeaceType.BLACK_LADZIA] = BlackLadzia;
		_classes[PeaceType.BLACK_GETMAN] = BlackGetman;
		_classes[PeaceType.BLACK_KNIAZHYCH] = BlackKniazhych;
		_classes[PeaceType.BLACK_KNIAZ] = BlackKniaz;
		
		public function PeaceViewFactory() {
			
		}
		
		public function createPeace(peaceType:uint):DisplayObject {
			return new _classes[peaceType] as DisplayObject;
		}
		
	}

}